home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d4 / cwp.arc / POSTSCPT.HDR < prev    next >
Text File  |  1990-10-28  |  4KB  |  176 lines

  1. %!PS-Adobe-1.0
  2. %%Title: Crossword Creator output, generated using POSTSCPT.BAT
  3. %%Creator: Crossword Creator
  4. %%Pages: (atend)
  5. %%BoundingBox: 0 0 340 420 
  6. %%EndComments
  7. % Copyright (c) 1990, Richard L. Siddall. All rights reserved.
  8.  
  9. % IMPORTANT NOTE: You must replace the last two numbers in the Bounding Box
  10. % line above with:
  11. %    cellwidth * width + 4    ; this is the width in points
  12. %    cellheight * height + 4 ; this is the height in points
  13. % Create a frame the same size in Ventura to hold the matrix.
  14. %
  15.  
  16. % Crossword procedures
  17. /cellheight 16 def
  18. /cellwidth 16 def
  19.  
  20. % xboundary - construct the path for the edge of the matrix
  21. /xboundary {
  22.     0 0 moveto
  23.     cellwidth width mul 0 rlineto 
  24.     0 cellheight height mul rlineto
  25.     cellwidth width mul neg 0 rlineto
  26.     closepath } def
  27.  
  28. % cell - Construct path for cell outline
  29. /cell    {
  30.     0 cellheight rlineto
  31.     cellwidth 0 rlineto
  32.     0 cellheight neg rlineto
  33.     cellwidth neg 0 rlineto
  34.     closepath
  35.     } def
  36.  
  37. % xcell - takes two strings, the number and the letter
  38. /xcell    {
  39.     gsave    % Fill cell with white
  40.         1 setgray
  41.         cell fill
  42.     grestore
  43.     gsave    % Stroke line around cell
  44.         cell stroke
  45.     grestore
  46.     gsave    % Place solution letter in center of cell
  47.         /Helvetica findfont 12 scalefont setfont
  48.         dup stringwidth pop cellwidth exch sub 2 div cellheight .1 mul rmoveto
  49.         show
  50.     grestore
  51.     gsave    % Place solution number in top left of cell
  52.         /Helvetica findfont 6 scalefont setfont
  53.         cellwidth .1 mul cellheight .7 mul rmoveto 
  54.         show
  55.     grestore
  56.     cellwidth 0 rmoveto    % Move to next cell origin
  57.     } def
  58.  
  59. % bxcell - a blank cell
  60. /bxcell {
  61. %    gsave
  62. %        cell
  63. %        gsave
  64. %            stroke
  65. %        grestore
  66. %        currentpoint add 1500 div setgray fill
  67. %    grestore
  68.     cellwidth 0 rmoveto    % Move to next cell origin
  69.     } def
  70.  
  71. % newrow - go to the start of the next row down
  72. /newrow    {
  73.     cellwidth width mul neg cellheight neg rmoveto
  74.     } def
  75.  
  76. % Code from PostScript Cookbook Program 15: Filling an area with a pattern.
  77. /setuserscreendict 22 dict def
  78. setuserscreendict begin
  79. /tempctm matrix def
  80. /temprot matrix def
  81. /tempscale matrix def
  82.  
  83. /concatprocs {
  84.     /proc2 exch cvlit def
  85.     /proc1 exch cvlit def
  86.     /newproc proc1 length proc2 length add array def
  87.     newproc 0 proc1 putinterval
  88.     newproc proc1 length proc2 putinterval
  89.     newproc cvx
  90.     } def
  91.  
  92. /resmatrix matrix def
  93. /findresolution {
  94.     72 0 resmatrix defaultmatrix dtransform
  95.     /yres exch def /xres exch def
  96.     xres dup mul yres dup mul add sqrt
  97.     } def
  98. end
  99.  
  100. /setuserscreen {
  101.     setuserscreendict begin
  102.     /spotfunction exch def
  103.     /screenangle exch def
  104.     /cellsize exch def
  105.     /m tempctm currentmatrix def
  106.     /rm screenangle temprot rotate def
  107.     /sm cellsize dup tempscale scale def
  108.  
  109.     sm rm m m concatmatrix m concatmatrix pop
  110.     1 0 m dtransform /y1 exch def /x1 exch def
  111.     /veclength x1 dup mul y1 dup mul add sqrt def
  112.     /frequency findresolution veclength div def
  113.     /newscreenangle y1 x1 atan def
  114.     m 2 get m 1 get mul m 0 get m 3 get mul sub 0 gt
  115.     { {neg} /spotfunction load concatprocs
  116.     /spotfunction exch def } if
  117.     frequency newscreenangle /spotfunction load setscreen
  118.     end
  119.     } def
  120.  
  121. /setpatterndict 18 dict def
  122. setpatterndict begin
  123. /bitison {
  124.     /ybit exch def /xbit exch def
  125.     /bytevalue bstring ybit bwidth mul xbit 8 idiv add get def
  126.     /mask 1 7 xbit 8 mod sub bitshift def
  127.     bytevalue mask and 0 ne
  128.     } def
  129. end
  130.  
  131. /bitpatternspotfunction {
  132.     setpatterndict begin
  133.     /y exch def /x exch def
  134.     /xindex x 1 add 2 div bpside mul cvi def
  135.     /yindex y 1 add 2 div bpside mul cvi def
  136.     xindex yindex bitison
  137.     { /onbits onbits 1 add def 1 }
  138.     { /offbits offbits 1 add def 0 }
  139.     ifelse
  140.     end
  141.     } def
  142.  
  143. /setpattern {
  144.     setpatterndict begin
  145.     /cellsz exch def
  146.     /angle exch def
  147.     /bwidth exch def
  148.     /bpside exch def
  149.     /bstring exch def
  150.     /onbits 0 def /offbits 0 def
  151.     cellsz angle /bitpatternspotfunction load setuserscreen
  152.     {} settransfer
  153.     offbits offbits onbits add div setgray
  154.     end
  155.     } def
  156.  
  157. %%EndProlog
  158. %Begin page
  159.  
  160. /inch {72 mul} def
  161.  
  162. % This version of Adobe's "showpattern" uses "xboundary" for the clip path
  163. /showpattern {
  164.     /ang exch def
  165.     /pat exch def
  166.     pat 8 1 ang 72 300 32 div div setpattern
  167.     newpath
  168.         xboundary
  169.     closepath fill
  170.     } def
  171.  
  172. /pat1 <d1e3c5885c3e1d88> def
  173. /pat2 <3e418080e3140808> def
  174.  
  175.  
  176.